package com.shop.common.entity.paper;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.shop.common.typeHandler.PaperQuestionListTypeHandler;
import com.shop.common.vo.PaperQuestionVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

@Data
@ApiModel("考试记录实体")
@TableName(autoResultMap = true)
public class PaperLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value="id", type= IdType.AUTO)
    @ApiModelProperty(value = "")
    private Integer id;

    @ApiModelProperty(value = "用户类型,1技师，2合伙人")
    private Integer userType;

    @ApiModelProperty(value = "用户ID")
    private String userId;

    @ApiModelProperty(value = "用户名称")
    private String userName;

    @ApiModelProperty(value = "试卷")
    private Integer paperId;

    @ApiModelProperty(value = "考试名称")
    private String paperTitle;

    @ApiModelProperty(value = "总分")
    private Integer totalScore;

    @ApiModelProperty(value = "及格线")
    private Integer passingMark;

    @ApiModelProperty(value = "得分")
    private Integer score;

    @ApiModelProperty(value = "学分")
    private Integer credit;

    @ApiModelProperty(value = "答对题数")
    private Integer correctCount;

    @ApiModelProperty(value = "答错题数")
    private Integer wrongCount;

    @ApiModelProperty(value = "结果，0未交卷，1已通过，2未通过")
    private Integer status;

    @ApiModelProperty(value = "用时(秒)")
    private Integer time;

    @ApiModelProperty(value = "开卷时间")
    private Long createTime;

    @ApiModelProperty(value = "开卷IP")
    private String createIp;

    @ApiModelProperty(value = "交卷时间")
    private Long submitTime;

    @ApiModelProperty(value = "交卷IP")
    private String submitIp;

    @ApiModelProperty(value = "更新时间")
    private Long updateTime;

    @ApiModelProperty(value = "试题")
    @TableField(typeHandler = PaperQuestionListTypeHandler.class)
    private List<PaperQuestionVo> questions;
}